/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.platform.mapper;

import org.springblade.modules.platform.dto.EquipmentRuningStatePageListDTO;
import org.springblade.modules.platform.entity.EquipmentRuningState;
import org.springblade.modules.platform.vo.EquipmentRuningStateByTimeVO;
import org.springblade.modules.platform.vo.EquipmentRuningStateVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 *  Mapper 接口
 *
 * @author BladeX
 * @since 2020-12-15
 */
public interface EquipmentRuningStateMapper extends BaseMapper<EquipmentRuningState> {

	/**
	 * 自定义分页
	 *
	 * @param page
	 * @param equipmentRuningState
	 * @return
	 */
	List<EquipmentRuningStateVO> selectEquipmentRuningStatePage(IPage page, EquipmentRuningStateVO equipmentRuningState);


	void createTable(String tableTypeName);

	List<EquipmentRuningState>selectListPage(EquipmentRuningStatePageListDTO equipmentRuningStatePageListDTO);


	EquipmentRuningState selectByEquipmentId(String equipmentId,String propertieId);

	Integer selectListCount(EquipmentRuningStatePageListDTO equipmentRuningStatePageListDTO);


	Integer insertEquipmentRuningState (EquipmentRuningState equipmentRuningState);
	List<EquipmentRuningState> selectList_v2(String equipmentId);

	/**
	 * 获取当前数据库表名
	 * @return
	 */
	List<String> getTableNameList();
	List<EquipmentRuningState> selectByEquipmentId2(@Param("equipmentId") String equipmentId,
													@Param("timeStart")Long timeStart,
													@Param("timeEnd")Long timeEnd,
													@Param("curPage") Integer curPage,
													@Param("size")Integer size);

	List<EquipmentRuningState> selectByEquipmentId3(@Param("equipmentId") String equipmentId,
													@Param("list") List<String> list,
													@Param("startTime")Long startTime,
													@Param("endTime")Long endTime);

	Integer selectByEquipmentIdCount(@Param("equipmentId") String equipmentId,
													@Param("item") String item);
	List<EquipmentRuningStateByTimeVO>  selectList_v6 (@Param("equipmentId") String equipmentId);
	Integer selectByEquipmentIdcount3(@Param("equipmentId") String equipmentId,
									  @Param("startTime")Long startTime,
									  @Param("endTime")Long endTime);
	List<EquipmentRuningState> selectList_v8 (@Param("equipmentId") String equipmentId,
									  @Param("startTime")Long startTime,
									  @Param("endTime")Long endTime);



	EquipmentRuningState selectByGatherId(@Param("equipmentId") String equipmentId,@Param("gatherId") Integer gatherId);
}
